using UnityEngine;
using BehaviorDesigner.Runtime;
using BehaviorDesigner.Runtime.Tasks;
using Gameplay;

public class MoveToTarget : Action
{
	public SharedTransform Target;

	private Character _character;
	public override void OnStart()
	{
		_character = GetComponent<Character>();

	}

	public override TaskStatus OnUpdate()
	{
	
		_character.MoveToTarget(Target.Value.position);
		
		return TaskStatus.Running;
	}
}